<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('用户ticket信息')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-staff-resetPwd">
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">手机号：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text"   name="mobile" id="mobile"  th:value="${mobile}" readonly/>
					<input class="form-control" type="hidden"   name="id" id="id"  th:value="${id}" />

				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">用户昵称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text"   name="username" id="username" th:value="${name}" readonly/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">所属系统：</label>
				<div class="col-sm-8">
					<select id="platformId" name="platformId" class="form-control m-b"  onchange="getTicket()">
						<option  th:each="platform : ${platform}"  th:value="${platform.platformId}"  th:text="${platform.name}">所属系统</option>
					</select>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">ticket：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text"   name="ticket" id="ticket" th:value="${ticket}" />
				</div>
			</div>

		</form>
	</div>
	<th:block th:include="include :: footer" />
	<script type="text/javascript">
		function getTicket() {
			var platformId = $("#platformId").val();
			var id = $("#id").val();
			$.ajax({
				cache : true,
				type : "POST",
				url: "/sso/staff/getTicket",
				async : false,
				data : {
					"platformId":platformId,
					"staffId":id
				},
				error : function(request) {
					$.modal.alertError("系统错误");
				},
				success : function(data) {
					$("#ticket").val(data);
				}
			});
		}
	</script>
</body>

</html>
